module Chain
  
  class Proxy
  
    def method_missing(method, *args, &block)
      @result = (class << self; self; end).send(:define_method, method, &block);
    end
  
    def get
      @result;
    end
  
  end
  
  def chain(&block)
    chain = Proxy.new
    chain.instance_eval(&block);
    chain;
  end
  
end

class Foo
  include Chain;
  
  def kill
    killed = true; 
    chain do
      with do |whom|
        @killer = whom;
        self;
      end
      with_hidden_proves do |n|
        n;
      end
    end
  end
  

  
end

f = Foo.new
p f.kill.with(:me).with_hidden_proves(8)